home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / Buch / Stringy.cpp < prev    next >
C/C++ Source or Header  |  1998-12-28  |  895b  |  27 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "Stringy.h"
  6. //---------------------------------------------------------------------------
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. //---------------------------------------------------------------------------
  10. __fastcall TForm1::TForm1(TComponent* Owner)
  11.     : TForm(Owner)
  12. {
  13. }
  14. //---------------------------------------------------------------------------
  15.  
  16. char *StrToChar (String s) {return s.c_str ();}
  17. String CharToStr (char *s) {return String(s);}
  18.  
  19. //---------------------------------------------------------------------------
  20.  
  21. void __fastcall TForm1::Button1Click(TObject *Sender)
  22. {
  23.    char *Text = StrToChar (Edit1->Text);
  24.    Label1->Caption = CharToStr (Text);
  25. }
  26. //--------------------------------------------------------------------------- 
  27.